package live.jialing.sip.message.box.util;

import live.jialing.sip.message.box.vo.Receiver;
import live.jialing.util.mapper.JsonMapper;

/**
 * 收件人工具类
 */
public class ReceiverUtil {

    /**
     * 序列化
     *
     * @param data
     * @return
     */
    public static String serialization(Receiver data) {

        return JsonMapper.toJ(data);
    }

    /**
     * 反序列化
     *
     * @param data
     * @return
     */
    public static Receiver deserialization(String data) {

        return JsonMapper.fromJ(data, Receiver.class);
    }
}
